package trading_strategy.events.filtered;

import trading_strategy.events.EventListener;
import trading_strategy.events.EventManager;
import trading_strategy.events.EventProvider;
import trading_strategy.instruments.ListedInstrument;

/**
 * Created by IntelliJ IDEA.
 * User: gderoujoux
 * Date: 24 mai 2010
 * Time: 16:32:09
 * To change this template use File | Settings | File Templates.
 */
public abstract class DerivedSignal extends EventProvider implements EventListener {
    ListedInstrument instrument;
    EventProvider baseProvider;

    public DerivedSignal(String name, String dispatcherName, ListedInstrument instrument, EventProvider baseProvider) {
        super(name, dispatcherName);
        this.instrument = instrument;
        this.baseProvider = baseProvider;
    }

    public void subscribe() {
        EventManager.getInstance().subscribe(this, baseProvider);
    }
}
